import Taro, { Component } from '@tarojs/taro'
import { View, Text,Image, } from '@tarojs/components'
import './index.less'

export default class collection extends Component {

  config = {
    navigationBarTitleText: '收藏',
  }


  // componentWillMount () { }

  // componentDidMount () { }

  // componentWillUnmount () { }

  // componentDidShow () { }

  // componentDidHide () { }

  render () {
    const data = {
      lists:[
        {
          id:1,
          img:'http://iph.href.lu/300x200?text=占位',
          name:'吉来乐会所',
          title:'桌游',
          address:'商之都 12km'
        },{
          id:2,
          img:'http://iph.href.lu/300x200?text=占位',
          name:'智享酒店',
          title:'棋牌室',
          address:'商之都 12km'
        }
      ]
    }
    return (
      <View className='index'>
        {data.lists.map(item=>(
            <View key={item.id} className='list-box'>
              <View className='list-box-first'>
                <Image src={item.img} className='listImg' />
                <View className='list-box-first-bottom'>
                  <Text className='bottom-name'>{item.name}</Text>
                  <Text className='bottom-title'>{item.title}</Text>
                </View> 
              </View>
              <Text className='list-box-address'>{item.address}</Text>
            </View>  
          ))}  
      </View>
    )
  }
}

